package com.IntelligentCommunity.es.api;

import com.IntelligentCommunity.common.core.constant.ServiceNameConstants;
import com.IntelligentCommunity.common.core.domain.R;
import com.IntelligentCommunity.es.api.factory.RemoteEsMatchingDataFallbackFactory;
import com.IntelligentCommunity.es.domain.vo.EsDocInsertVo;
import com.IntelligentCommunity.es.domain.vo.EsDocQueryVo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;
import java.util.Map;

/**
 * @Author：作者姓名
 * @Package：com.IntelligentCommunity.es.api
 * @Project：IntelligentCommunity
 * @name：RemoteEsPopulationService
 * @Date：2024/7/18 22:39
 */
@FeignClient(contextId = "remoteMatchisngDataService", value = ServiceNameConstants.ES_SERVICE, fallbackFactory = RemoteEsMatchingDataFallbackFactory.class)
public interface RemoteEsMatchingDataService {

    /**
     * 批量插入人脸匹配信息数据
     * @param esDocInsertVo Es数据实体
     * @return Boolean
     */
    @PostMapping("/esDoc/insertCaptureData")
    public R<Boolean> insertCaptureData(@RequestBody List<EsDocInsertVo> esDocInsertVo);


    /**
     * 批量插入汽车匹配信息数据
     * @param esDocInsertVo Es数据实体
     * @return Boolean
     */
    @PostMapping("/esDoc/insertCarMatchingData")
    public R<Boolean> insertCarMatchingData(@RequestBody List<EsDocInsertVo> esDocInsertVo);


    /**
     * 查询匹配数据
     * @return Map
     */
    @PostMapping("/esDoc/selectCaptureData")
    public R<List<Map>> selectCaptureData(@RequestBody EsDocQueryVo esDocQueryVo);

    /**
     * 多索引查询
     * @param esDocQueryVo Es数据实体
     * @return 结果
     */
    @PostMapping("/esDoc/selectDoorAll")
    public R<List<Map>> selectDoorAll(@RequestBody EsDocQueryVo esDocQueryVo);

}
